﻿@{
    ViewBag.Title = "Home Page";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="/Content/ytcms/css/index.css" rel="stylesheet" />
@model IQueryable<YTCMS.Domain.Entities.cmscolumn>
@using YTCMS.Core
<!--banner轮播开始-->
<div class="banner slider">
    @*<div class="bannerImg bd">
        <ul>
            <li><a target="_blank" href=""><img src="/Content/ytcms/img/b2cImg_IlsydaF8N3peV540uDC421447307094716319QixT3KxdJXWi0.jpg" height="370" alt="" /></a></li>
            <li><a target="_blank" href=""><img src="/Content/ytcms/img/b2cImg_lyXbmOYFYi9Y4SAYtnXI0144740035796821BTtlRAKLq1MQMn.jpg" height="370" alt="" /></a></li>
            <li><a target="_blank" href=""><img src="/Content/ytcms/img/b2cImg_M2zytIQuNpPG097k6Pmo3144739185916566us9CeJWmM5v05U.jpg" height="370" alt="" /></a></li>
            <li><a target="_blank" href=""><img src="/Content/ytcms/img/b2cImg_oMWvhmBFMSrZ4K7Sio3H114473241542984760Sm4kwtSBlJL0.jpg" height="370" alt="" /></a></li>
        </ul>
    </div>
    <div class="hd">
        <ul class="bannerDot">
            <li class="current"><a href="#"></a></li>
            <li class=""><a href="#"></a></li>
            <li class=""><a href="#"></a></li>
            <li class=""><a href="#"></a></li>
        </ul>
    </div>
    <div class="pnBtn prev">
        <span class="blackBg"></span>
        <a class="arrows" href="javascript:void (0)"></a>
    </div>
    <div class="pnBtn next">
        <span class="blackBg"></span>
        <a class="arrows" href="javascript:void (0)"></a>
    </div>*@
    @Html.Action("Index", "Ads", new { code = "HomeAds" })
</div>

@if (Model.Any())
{
    foreach (var item in Model)
    {
    ///特色主题
    if (item.Code.Equals("CHARACTERISTIC"))
    { 
        <!--特色主题-->
        <div class="Characteristic">
            <div class="publicHead">
                <div class="centerHead">
                    <p>@item.ETitle</p>
                    <h3>@item.Title</h3>
                </div>
            </div>
            <div class="new-section">
                <div class="container">
                    <div class="row">
                        <div class="col-md-11 col-md-offset-1">
                            <ul>
                                @{
                                    int i = 1;
                                    foreach (var item2 in item.columnproducts.Where(s=>s.Cid ==item.Id).YTTake(3))
                                    {
                                        if (i == 1)
                                        { 
                                            <li>
                                                <div>
                                                    <div class="Characteristic_head">
                                                        <h3>
                                                            <a href="/products/details?id=@item2.products.Id">@item2.products.Name</a>
                                                        </h3>
                                                        <p>
                                                            @item2.products.Introduce.GetSubString(100,"")
                                                        </p>
                                                    </div>
                                                    <div class="Characteristic_image">
                                                        <img src="@item2.products.ExtendFile("Image").Replace("_120x120.jpg", "_320x275.jpg")" />
                                                    </div>
                                                </div>
                                            </li>
                                        }
                                        if (i == 2)
                                        { 
                                            <li>
                                                <div>
                                                    <div class="Characteristic_image2">
                                                        <img src="@item2.products.ExtendFile("Image").Replace("_120x120.jpg", "_320x275.jpg")" />
                                                    </div>
                                                    <div class="Characteristic_head">
                                                        <h3>
                                                            <a href="/products/details?id=@item2.products.Id">@item2.products.Name</a>
                                                        </h3>
                                                        <p>
                                                            @item2.products.Introduce.GetSubString(100, "")
                                                        </p>
                                                    </div>
                                                </div>
                                            </li>
                                        }
                                        if (i == 3)
                                        { 
                                            <li>
                                                <div>
                                                    <div class="Characteristic_head">
                                                        <h3>
                                                            <a href="/products/details?id=@item2.products.Id">@item2.products.Name</a>
                                                        </h3>
                                                        <p>
                                                            @item2.products.Introduce.GetSubString(100, "")
                                                        </p>
                                                    </div>
                                                    <div class="Characteristic_image3">
                                                        <img src="@item2.products.ExtendFile("Image").Replace("_120x120.jpg", "_320x275.jpg")" />
                                                    </div>
                                                </div>
                                            </li>
                                        }
                                        i++;
                                    }
                                }
                                
                            </ul>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    }

    if (item.Code.Equals("DESTINATION"))
    {
                    
        <!---目的地-->
        <div class="destination">
            <div class="jumbotron destination_body">
                <div class="publicHead">
                    <div class="centerHead">
                        <p>@item.ETitle</p>
                        <h3>@item.Title</h3>
                    </div>
                </div>
                <div class="container">
                    <div class="row">
                        <div class="col-md-12">
                            <ul class="ch-grid">
                                @foreach (var item2 in item.columnproducts.Where(s => s.Cid == item.Id).YTTake(5))
                                { 
                                    <li>
                                        <div class="ch-item ch-img-1">
                                            <div class="ch-info-wrap">
                                                <div class="ch-info">
                                                    <div class="ch-info-front">
                                                        <img src="@item2.products.ExtendFile("Image").Replace("_120x120.jpg", "_200x200.jpg")" />
                                                    </div>
                                                    <div class="ch-info-back">
                                                        <h3>@item2.products.Name.GetSubString(5, "")</h3>
                                                        <p>@item2.products.Introduce.GetSubString(10,"")</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="ch-scenic">
                                            <h3>@item2.products.Name.GetSubString(5,"")</h3>
                                            <p>
                                                @item2.products.Introduce.GetSubString(40, "")
                                            </p>
                                        </div>
                                        <div class="ch-scenic-more">
                                            <div class="ch-scenic-more-info">
                                                <a href="/products/details?id=@item2.products.Id">MORE+ </a>
                                            </div>
                                        </div>
                                    </li>
                                }
                                

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    }

    if (item.Code.Equals("PRIVATE"))
    {
            <!---私人订制-->
    <div class="private">
    <div class="jumbotron private-head">
        <div class="publicHead">
            <div class="centerHead">
                <p>@item.ETitle</p>
                <h3>@item.Title</h3>
            </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-md-10 col-md-offset-2 private-title">
                    <div class="col-md-4">
                        <a href="/Custom/Index">
                            <div class="private-push1">
                                <p>提交需求</p>
                            </div>
                        </a>
                    </div>
                    <div class="col-md-4">
                        <a href="/Custom/Index">
                            <div class="private-push2">
                                <p>设计方案</p>
                            </div>
                        </a>
                    </div>
                    <div class="col-md-4">
                        <a href="/Custom/Index">
                            <div class="private-push3">
                                <p>尊贵出行</p>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="jumbotron private-body">
        <div class="container">
            <div class="row">
                <div class="col-md-10 private-offset">
                    <div class="list_carousel">
                        <ul id="foo2">
                        @foreach (var item2 in item.columnproducts.Where(s => s.Cid == item.Id).YTTake(6))
                        { 
                            <li>
                                <div class="view view-first">
                                    <img src="@item2.products.ExtendFile("Image").Replace("_120x120.jpg", "_285x440.jpg")" class="img-responsive" alt="">
                                    <div class="mask">
                                        <div>
                                            <div>
                                                <h3><a href="#">@item2.products.Name</a></h3>
                                                <p>
                                                    @item2.products.Introduce.GetSubString(200,"")
                                                </p>
                                                <div class="ch-scenic-more-info">
                                                    <a href="/products/details?id=@item2.products.Id">MORE+ </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </li>
                        }
                            
                            
                        </ul>
                        <div class="clearfix"></div>
                        <a id="prev" class="prev" href="#">&lt;</a>
                        <a id="next" class="next" href="#">&gt;</a>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
    }

        if (item.Code.Equals("STRATEY"))
        {
            <!---纯玩攻略-->
            <div class="pure">
                <div class="jumbotron pure_body">
                    <div class="publicHead">
                        <div class="centerHead">
                            <p>PURE PLAY STRATEY </p>
                            <h3>纯玩攻略</h3>
                        </div>
                    </div>
                    <div class="pure_list_carousel responsive">
                        <ul id="foo3">
                        @foreach (var item2 in item.columnproducts.Where(s => s.Cid == item.Id).YTTake(12))
                        { 
                            <li>
                                <div class="view view-first">
                                    <img src="@item2.products.ExtendFile("Image").Replace("_120x120.jpg", "_300x300.jpg")" class="img-responsive" alt="">
                                    <div class="pure_list_mask">
                                        <div id="small-dialog2" class="mfp-hide">
                                            <div>
                                                <h3><a href="/products/details?id=@item2.products.Id">@item2.products.Name</a></h3>
                                                <p>
                                                    @item2.products.Introduce.GetSubString(40, "")
                                                </p>
                                                <div class="pure_list_mask-next">
                                                    <a href="/products/details?id=@item2.products.Id"><img src="~/Content/ytcms/img/n1.png" /></a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </li>
                        }
                            

                        </ul>
                        <div class="clearfix"></div>
                        <div id="pager" class="pager"></div>
                    </div>
                </div>
            </div>
        }
    
    }
}



<!--友情链接--->
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <ul class="link">
                <li><span>友情链接</span>:</li>
                <li>宇途.天猫</li>
                <li>宇途.去哪儿</li>
                <li>宇途.京东</li>
            </ul>
        </div>
    </div>
</div>